package com.example.novelweb.controller;

import com.example.novelweb.common.BaseResponse;
import com.example.novelweb.model.entity.Tag;
import com.example.novelweb.model.vo.TagVO;
import com.example.novelweb.service.TagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping("/tag")
public class TagController {
  @Resource
  private TagService tagService;


  @GetMapping("/list")
  public BaseResponse<List<TagVO>> listAllTag(HttpServletRequest httpServletRequest) {
    return tagService.listAll();
  }
}
